//
//  PGCollectionViewCell.m
//  youqu
//
//  Created by 彭鹏 on 16/10/2.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGCollectionViewCell.h"
#import "PGButtonCell.h"
#import <SDWebImage/UIButton+WebCache.h>

@interface PGCollectionViewCell()
@property (weak, nonatomic) IBOutlet PGButtonCell *squareButton;

@end


@implementation PGCollectionViewCell

- (void)setSquareItem:(PGSquareItem *)squareItem {
    _squareItem = squareItem;
    [_squareButton sd_setImageWithURL:[NSURL URLWithString:squareItem.icon] forState:UIControlStateNormal completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        [_squareButton setImage:[image imageCicle:image] forState:UIControlStateNormal];
    }];
    [_squareButton setTitle:squareItem.name forState:UIControlStateNormal];
}

@end
